import base from './base'
import axios from 'axios'
import qs from 'qs'

const api = {
  getMusic () {
    return axios.get(base.musicUrl)
  },
  getNewsong () {
    const data = qs.stringify({
      params: 'cah6+n9GrA65MgchLkWFMSX2BEsnL7WtVTcYRrFEHkC3f/RKvxCFKY1uGME6dNk+',
      encSecKey: 'b7df1cd607dc4c806e995f7909378759d1f066d7b8429290d279a555f918d43195559ef315dec3344d605774875df99480e79ff14cdccbe2e92f1133937a5093da1c2f421f2813db564ca5a46a5234a0ee4b7aeee2d62a86daeb6ada616ae86c7bff39d0b1a6f4b3d34d283c20d0a8581073dc5edc9c270be982ddf0b68e7091'
  })
    return axios.post(base.newsongUrl, data)
  },
  getHotsong(){
    const data = qs.stringify({
      params: 'duPqwvCj24lSJcoWJVERXMymxuqW7NoTj8Pl1VBpYfdiBDdkKBQSyshxUQnaHKQP',
      encSecKey: '5f8c297397afc368a14285ee9afcfdd6ad088935a6b5bc0f8f7fdc92716e85f6f2ebd5d939df456b6e446fc9690ef22840c8e94eef6175c2f1eae951458fa49344c278a42660d4ce0c372edaecf0a5a3f2e86a3c20db4864533c99d75bb9f985d68345e8f96f146caf915238320ad88f29c569beae19bcea813940970c0b6ba4'
  })
    return axios.post(base.hotsongUrl, data)
  },
  getSearchUrl(){
    const data = qs.stringify({
      params: 'il0tydox5psYcZsmz/zkpkpy0k7ywY30t69VR1TXchI=',
      encSecKey: 'd6474ea0f5ef7c2787a5d0396b5a42e1cecd4589cc4bbc9430a7d7d54b2b95d315dfcff5c9a35bf4ee7769d18261e9777ea24aedf1fbdf96ebceb60b016261367cae2d2a95595c721c9f30ead1b9fe997583f97ff5a437a88334fc50a30925f22d184c05b3f03d63c505daabbdc07a46df968e4fe346df4d179c022d1dd66ddf'
  })
    return axios.post(base.searchUrl, data)
  },
  search(params){
    return axios.get(base.search, {
      params
    })
  },
  musicplaylist(){
    const data = qs.stringify({
      params:'mhQ7P/ChaovJlTKNQO2IzePR+R1bBsavYHD4UtzN3QDRV8C4hxXKbisZ3tFE9COrDIihjggNg0SqfsCf/kgk8qt0rrWCG7a39/w/43gMugg=',
      encSecKey:'787c75337c63a7669ee422cf06bb797105ab856878004801364a36b022c0e68334193e3e5199e8dbdc5bfb207770f1724650e523a18f068d789b867eef72e28bddbc665502ba51c5d884dbf8eadee8d3a8e42530d917c800ff4ff2dcd9e8f6541ecb7205b65f9e3c883833ac5bc45f73902137d96fca15309ab926345210a48b'
  })
    return axios.post(base.musicplaylist, data)
  },
  songPage(){
    const data = qs.stringify({
      params:'Qd7ky7OreYuUjaQ5SgLXgzkg3Urz5fm2MGZnjzJu7pAhPVnJ+gN2mWC8C84JCZN2dxVDjxV8DN125BgRa1g8lQzfm++Jn9VHelFTeydlzJlyolVZHLDPkeynN5HOHNSE',
      encSecKey:'a3febb66b2be340668941eab118376f466454bd19d1775b7eecfed52f0cec563e16be6b419af5c1e19860352bdbef7936904d187a07db9ca9db12c78531d51aeb38268f98ee0504f68362e06d8bbf691aa50bc9bbe91145d7a88d2199009163dc39dd5a2568633826700cad5c934cabad2d6cd26c13a52cb86b4406a687aeffc'
  })
    return axios.post(base.songPage, data)
  },
  getLyric(params){
    return axios.get(base.lyric,{
      params
    })
  }
}

export default api
